package com.acc.mobileappr.entities;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.sql.Date;

/**
 * Created by IntelliJ IDEA.
 * User: user
 * Date: Apr 20, 2011
 * Time: 10:54:52 AM
 * To change this template use File | Settings | File Templates.
 */
@javax.persistence.IdClass(com.acc.mobileappr.entities.TrnMApprRequestEntityPK.class)
@javax.persistence.Table(name = "TRN_M_APPR_REQUEST", schema = "ACC_BBMX")
@Entity
public class TrnMApprRequestEntity {
    private String reqNo;

    @javax.persistence.Column(name = "REQ_NO")
    @Id
    public String getReqNo() {
        return reqNo;
    }

    public void setReqNo(String reqNo) {
        this.reqNo = reqNo;
    }

    private String reqType;

    @javax.persistence.Column(name = "REQ_TYPE")
    @Basic
    public String getReqType() {
        return reqType;
    }

    public void setReqType(String reqType) {
        this.reqType = reqType;
    }

    private String pin;

    @javax.persistence.Column(name = "PIN")
    @Id
    public String getPin() {
        return pin;
    }

    public void setPin(String pin) {
        this.pin = pin;
    }

    private String regNo;

    @javax.persistence.Column(name = "REG_NO")
    @Basic
    public String getRegNo() {
        return regNo;
    }

    public void setRegNo(String regNo) {
        this.regNo = regNo;
    }

    private String data;

    @javax.persistence.Column(name = "DATA")
    @Basic
    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    private String userId;

    @javax.persistence.Column(name = "USER_ID")
    @Basic
    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    private String pushId;

    @javax.persistence.Column(name = "PUSH_ID")
    @Basic
    public String getPushId() {
        return pushId;
    }

    public void setPushId(String pushId) {
        this.pushId = pushId;
    }

    private String retryRemain;

    @javax.persistence.Column(name = "RETRY_REMAIN")
    @Basic
    public String getRetryRemain() {
        return retryRemain;
    }

    public void setRetryRemain(String retryRemain) {
        this.retryRemain = retryRemain;
    }

    private String pushStatus;

    @javax.persistence.Column(name = "PUSH_STATUS")
    @Basic
    public String getPushStatus() {
        return pushStatus;
    }

    public void setPushStatus(String pushStatus) {
        this.pushStatus = pushStatus;
    }

    private Date pushDate;

    @javax.persistence.Column(name = "PUSH_DATE")
    @Basic
    public Date getPushDate() {
        return pushDate;
    }

    public void setPushDate(Date pushDate) {
        this.pushDate = pushDate;
    }

    private String receivedStatus;

    @javax.persistence.Column(name = "RECEIVED_STATUS")
    @Basic
    public String getReceivedStatus() {
        return receivedStatus;
    }

    public void setReceivedStatus(String receivedStatus) {
        this.receivedStatus = receivedStatus;
    }

    private Date receivedDate;

    @javax.persistence.Column(name = "RECEIVED_DATE")
    @Basic
    public Date getReceivedDate() {
        return receivedDate;
    }

    public void setReceivedDate(Date receivedDate) {
        this.receivedDate = receivedDate;
    }

    private String actionStatus;

    @javax.persistence.Column(name = "ACTION_STATUS")
    @Basic
    public String getActionStatus() {
        return actionStatus;
    }

    public void setActionStatus(String actionStatus) {
        this.actionStatus = actionStatus;
    }

    private Date actionDate;

    @javax.persistence.Column(name = "ACTION_DATE")
    @Basic
    public Date getActionDate() {
        return actionDate;
    }

    public void setActionDate(Date actionDate) {
        this.actionDate = actionDate;
    }

    private String docId;

    @javax.persistence.Column(name = "DOC_ID")
    @Basic
    public String getDocId() {
        return docId;
    }

    public void setDocId(String docId) {
        this.docId = docId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TrnMApprRequestEntity that = (TrnMApprRequestEntity) o;

        if (actionDate != null ? !actionDate.equals(that.actionDate) : that.actionDate != null) return false;
        if (actionStatus != null ? !actionStatus.equals(that.actionStatus) : that.actionStatus != null) return false;
        if (data != null ? !data.equals(that.data) : that.data != null) return false;
        if (docId != null ? !docId.equals(that.docId) : that.docId != null) return false;
        if (pin != null ? !pin.equals(that.pin) : that.pin != null) return false;
        if (pushDate != null ? !pushDate.equals(that.pushDate) : that.pushDate != null) return false;
        if (pushId != null ? !pushId.equals(that.pushId) : that.pushId != null) return false;
        if (pushStatus != null ? !pushStatus.equals(that.pushStatus) : that.pushStatus != null) return false;
        if (receivedDate != null ? !receivedDate.equals(that.receivedDate) : that.receivedDate != null) return false;
        if (receivedStatus != null ? !receivedStatus.equals(that.receivedStatus) : that.receivedStatus != null)
            return false;
        if (regNo != null ? !regNo.equals(that.regNo) : that.regNo != null) return false;
        if (reqNo != null ? !reqNo.equals(that.reqNo) : that.reqNo != null) return false;
        if (reqType != null ? !reqType.equals(that.reqType) : that.reqType != null) return false;
        if (retryRemain != null ? !retryRemain.equals(that.retryRemain) : that.retryRemain != null) return false;
        if (userId != null ? !userId.equals(that.userId) : that.userId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = reqNo != null ? reqNo.hashCode() : 0;
        result = 31 * result + (reqType != null ? reqType.hashCode() : 0);
        result = 31 * result + (pin != null ? pin.hashCode() : 0);
        result = 31 * result + (regNo != null ? regNo.hashCode() : 0);
        result = 31 * result + (data != null ? data.hashCode() : 0);
        result = 31 * result + (userId != null ? userId.hashCode() : 0);
        result = 31 * result + (pushId != null ? pushId.hashCode() : 0);
        result = 31 * result + (retryRemain != null ? retryRemain.hashCode() : 0);
        result = 31 * result + (pushStatus != null ? pushStatus.hashCode() : 0);
        result = 31 * result + (pushDate != null ? pushDate.hashCode() : 0);
        result = 31 * result + (receivedStatus != null ? receivedStatus.hashCode() : 0);
        result = 31 * result + (receivedDate != null ? receivedDate.hashCode() : 0);
        result = 31 * result + (actionStatus != null ? actionStatus.hashCode() : 0);
        result = 31 * result + (actionDate != null ? actionDate.hashCode() : 0);
        result = 31 * result + (docId != null ? docId.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "TrnMApprRequestEntity{" +
                "reqNo='" + reqNo + '\'' +
                ", reqType='" + reqType + '\'' +
                ", pin='" + pin + '\'' +
                ", regNo='" + regNo + '\'' +
                ", data='" + data + '\'' +
                ", userId='" + userId + '\'' +
                ", pushId='" + pushId + '\'' +
                ", retryRemain='" + retryRemain + '\'' +
                ", pushStatus='" + pushStatus + '\'' +
                ", pushDate=" + pushDate +
                ", receivedStatus='" + receivedStatus + '\'' +
                ", receivedDate=" + receivedDate +
                ", actionStatus='" + actionStatus + '\'' +
                ", actionDate=" + actionDate +
                ", docId='" + docId + '\'' +
                '}';
    }
}
